Lithium-ion batteries, owing to their high power density, long lifespan, and reliable performance, are widely utilized in electric vehicle applications. The conventional charging method for these batteries is based on the constant current–constant voltage (CC-CV) protocol, in which the battery is initially charged with a constant current until a predefined voltage threshold is reached, followed by constant voltage charging with gradually decreasing current. Considering the variation in the internal resistance of the battery during the charging process, applying a variable charging current can reduce energy losses and enhance overall system efficiency without compromising battery lifespan. In this study, an optimized charging method for lithium-ion batteries is proposed, taking into account real-time battery parameters and their relationship with the state of charge (SOC). The charging process is modeled accurately and analyzed using the YALMIP toolbox and algorithms based on the branch and bound method. In this model, indicators such as the final state of charge, final cell temperature, and energy losses are considered as optimization criteria. Simulation results demonstrate that adaptive current charging, compared to constant current charging, leads to reduced energy losses and increased battery lifespan, as it provides sufficient time for voltage polarization in each charging cycle. These findings highlight the importance of developing intelligent charging strategies to enhance the performance of lithium-ion batteries in advanced applications.